package com.qf.test.controller;

import com.qf.test.entity.Admire;
import com.qf.test.service.AdmireService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("admire")
public class AdmireController {
    @Resource
    private AdmireService admireService;

    @RequestMapping("list")
    public String list(Model model){
        List<Admire> list = admireService.findAll();
        model.addAttribute("list", list);
        return "/info/admirelist";
    }
}
